<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>我的二维码</title>
		<link rel="stylesheet" href="../static/cssdemo1/commons.css" />
		<link rel="stylesheet" href="../static/cssdemo1/grzx.css" />
		<script src="../static/js/jquery.js"></script>
		<script src="../static/js/jquery.qrcode.min.js"></script>
    	<script src="../static/js/layer.js"></script>
	</head>
	<body>
		<div class="outdiv">
			<div class="head-top"> <!--表头开始  -->
				<span class="bt">我的二维码</span>
				
			</div> <!--表头结束  -->
			<div class="body-conter" style="bottom:60px;background-color: #fff;margin-top:20px;"><!--页面详情开始  -->
			
				<center>
			  	<div class="grnr" >
			  		
			  	</div>
			  	</center>
			</div><!--页面详情结束  -->
			<!--底部菜单开始                                                                                                      -->
				
		</div>
		
			<script type="text/javascript">
			
			function getUrlParam(name) {
	            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
	            if (r != null) return unescape(r[2]); return null; //返回参数值
		    }
			var url = location.href;
			console.log(url);
			var info = url.split("=")[1];
			//var info = decodeURIComponent(getUrlParam("BLRY")).replace(/"/g, "");
			//var info = encodeURI(getUrlParam("BLRY"));
			console.log(info);
			var infos = info.split("_");
			if(infos.length<2){
				alert("请输入办理人员和所属门店");
				history.go(-1);
			}
			var BLRY = info.split("_")[0];
			if(BLRY==null||BLRY==''){
				alert("请输入办理人员")
				history.go(-1);
			}
			var SZMD = info.split("_")[1];
			if(SZMD==null||SZMD==''){
				alert("请输入所属门店")
				history.go(-1);
			}
			
			console.log("http://1.13.247.142:8080/hisdemo/custom/edit.html?BLRY="+BLRY+"&SZMD="+SZMD);
			$(".grnr").qrcode("http://1.13.247.142:8080/hisdemo/custom/edit.html?BLRY="+BLRY+"&SZMD="+SZMD);
			</script>
	</body>
</html>
